from django.conf.urls import url

from book.views import index, detail, set_cookie, get_cookie, set_session, get_session, LoginView
# from book.views import index, detail, LoginView

urlpatterns = [
    url(r'^index/$', index, name='index'),
    # url(r'^(?P<category_id>\d+)/(?P<book_id>\d+)/$', detail, name='detail')
    url(r'^(?P<category_id>\d+)/(?P<book_id>\d+)/$', detail),
    url(r'^set_cookie/$', set_cookie),
    url(r'^get_cookie/$', get_cookie),
    url(r'^set_session/$', set_session),
    url(r'^get_session/$', get_session),
    url(r'^login/$', LoginView.as_view()),
]